﻿using Microsoft.Practices.Prism.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace FridgeManagerApp
{
    [DataContract]
    public class WDeviceStatus : NotificationObject
    {
        private int deviceUID;
        private String status;
        private String openID;
        private int personnelUID;

        [DataMember(Order = 0)]
        public int DeviceUID
        {
            get
            {
                return deviceUID;
            }
            set
            {
                deviceUID = value;
                RaisePropertyChanged("DeviceUID");
            }
        }

        [DataMember(Order = 1)]
        public String Status
        {
            get
            {
                return status;
            }
            set
            {
                status = value;
                RaisePropertyChanged("Status");
            }
        }

        [DataMember(Order = 2)]
        public String OpenID
        {
            get
            {
                return openID;
            }
            set
            {
                openID = value;
                RaisePropertyChanged("OpenID");
            }
        }

        [DataMember(Order = 3)]
        public int PersonnelUID
        {
            get
            {
                return personnelUID;
            }
            set
            {
                personnelUID = value;
                RaisePropertyChanged("PersonnelUID");
            }
        }

        public WDeviceStatus()
        {
            DeviceUID = -1;
            Status = "";
            OpenID = "";
            PersonnelUID = -1;
        }

        public WDeviceStatus(LDeviceStatus p)
        {
            DeviceUID = p.DeviceUID;
            Status = p.Status;
            OpenID = p.OpenID;
            PersonnelUID = p.PersonnelUID;
        }
    }
}
